/*
package com.eric.mybatisFlexUtil;
import com.alibaba.druid.pool.DruidDataSource;
import com.mybatisflex.codegen.Generator;
import com.mybatisflex.codegen.config.GlobalConfig;
import com.mybatisflex.core.service.IService;
public class MybatisFlexCodeGen {
    public static void main(String[] args) {
        //配置数据源
        DruidDataSource dataSource = new DruidDataSource();

        //根据不同项目不同修改
        dataSource.setUrl("jdbc:sqlite:C:\\CODE\\IDEA\\procurement-ledger\\procurementLedger.db");
//        dataSource.setUsername("root");
//        dataSource.setPassword("djydzt");

//        // mysql使用
//        dataSource.setUrl("jdbc:mysql://localhost:3306/mybatisflexdemo");
//        dataSource.setUsername("root");
//        dataSource.setPassword("djydzt");


        //创建配置内容
        GlobalConfig globalConfig = createGlobalConfigUseStyle();

        //通过 datasource 和 globalConfig 创建代码生成器
        Generator generator = new Generator(dataSource, globalConfig);

        //生成代码
        generator.generate();
    }

    public static GlobalConfig createGlobalConfigUseStyle() {
//        设定包的名称
        final String PACKAGE_NAME="com.eric.";

//         创建配置内容
        GlobalConfig globalConfig = new GlobalConfig();

//         设置根包
        globalConfig.setBasePackage(PACKAGE_NAME);

//        设置表前缀和只生成哪些表，这个根据不同项目不同表做出修改
//        globalConfig.setTablePrefix("tb_");
//        这个根据不同项目不同表做出修改
        globalConfig.setGenerateTable("user");
//        globalConfig.setGenerateTable("company_info","invoice_description","purchase_requisition","purchase_order",
//                "order_detail","payment_request","payment_detail","project","supplier","common_materials","applicant",
//                "professional_category");

//        设置生成 entity 并启用 Lombok
        globalConfig.setEntityGenerateEnable(true);
        globalConfig.setEntityPackage(PACKAGE_NAME+"domain.po");


//        Entity使用Lombok注解
        globalConfig.setEntityWithLombok(true);


        //设置生成 mapper
        globalConfig.setMapperGenerateEnable(true);
        globalConfig.setMapperPackage(PACKAGE_NAME+"mapper");

//        设置生成controller
        globalConfig.setControllerGenerateEnable(true);
        globalConfig.setControllerPackage(PACKAGE_NAME+"controller");

//        设置生成service
        globalConfig.setServiceGenerateEnable(true);
        globalConfig.setServicePackage(PACKAGE_NAME+"service");
//         service的父类IService
        globalConfig.setServiceSuperClass(IService.class);

//        设置生成serviceImpl
        globalConfig.setServiceImplGenerateEnable(true);
        globalConfig.setServiceImplPackage(PACKAGE_NAME+"service.impl");

//        设置作者注释
        globalConfig.setAuthor("eric.deng");

//        乐观锁名称
        globalConfig.setVersionColumn("version");
//
        return globalConfig;
    }
}
*/
